Skip to content

Conversation

aDotInTheVoid
Copy link
Member

P<T> has implemented DerefMut since #54277. While this was lamented at the time 1, rustc now relies on it extensively via the many implementors of MutVisitor 2.

Updates the docs to reflect that P<T> is fundamentally mutable, and a few other cleanups to make them nicer to browse.

r? @Nilstrieb

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 2, 2024
@aDotInTheVoid aDotInTheVoid added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Apr 2, 2024
@rust-log-analyzer

This comment has been minimized.

//! implementation changes (using a special thread-local heap, for example).
//! Moreover, a switch to, e.g., `P<'a, T>` would be easy and mostly automated.
//! * **Maintainability**: `P<T>` provides an interface, which can remain fully
//! functional even if the implementation changes (using a special thread-local
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

top ten things that didn't happen

Copy link
Member

@Noratrieb Noratrieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me when it works
next step: delete it I guess

`P<T>` has implemented `DerefMut` since rust-lang#54277. While this was lamented
at the time [1], rustc now relies on it extensively via the many
implementors of MutVisitor [2].

Updates the docs to reflect that `P<T>` is fundamentally mutable, and a
few other cleanups to make them nicer to browse.

[1]: rust-lang#54277 (comment)
[2]: https://doc.rust-lang.org/1.77.1/nightly-rustc/rustc_ast/mut_visit/trait.MutVisitor.html#implementors
@Noratrieb
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 3, 2024

📌 Commit 5075931 has been approved by Nilstrieb

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 3, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 3, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#123209 (Add section to sanitizer doc for `-Zexternal-clangrt`)
 - rust-lang#123342 (x.py test: remove no-op --skip flag)
 - rust-lang#123382 (Assert `FnDef` kind)
 - rust-lang#123386 (Set `CARGO` instead of `PATH` for Rust Clippy)
 - rust-lang#123393 (rustc_ast: Update `P<T>` docs to reflect mutable status.)
 - rust-lang#123394 (Postfix match fixes)
 - rust-lang#123412 (Output URLs of CI artifacts to GitHub summary)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0c11f13 into rust-lang:master Apr 3, 2024
@rustbot rustbot added this to the 1.79.0 milestone Apr 3, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 3, 2024
Rollup merge of rust-lang#123393 - aDotInTheVoid:ast-p-docs, r=Nilstrieb

rustc_ast: Update `P<T>` docs to reflect mutable status.

`P<T>` has implemented `DerefMut` since rust-lang#54277. While this was lamented at the time [1], rustc now relies on it extensively via the many implementors of MutVisitor [2].

Updates the docs to reflect that `P<T>` is fundamentally mutable, and a few other cleanups to make them nicer to browse.

[1]: rust-lang#54277 (comment)
[2]: https://doc.rust-lang.org/1.77.1/nightly-rustc/rustc_ast/mut_visit/trait.MutVisitor.html#implementors

r? `@Nilstrieb`
@aDotInTheVoid aDotInTheVoid deleted the ast-p-docs branch April 3, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants